package com.ms.service.module.analysis.db.model;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.ms.service.module.analysis.GameNameWithHallType;
import com.ms.service.module.analysis.PlatformType;
import com.xpec.c4.db.model.basic.BasicModel;


/**
 * 新的即時統計model
 */
@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
@Table(name = RealTimeAnalysisModelV2.TABLE_NAME)
@org.hibernate.annotations.Table(
		appliesTo = RealTimeAnalysisModelV2.TABLE_NAME, indexes =
		{
				@org.hibernate.annotations.Index(name = "IDX_GAME_PLATFORM", columnNames = { "gameNameWithHallType","platformType"}),
		}
)
public class RealTimeAnalysisModelV2 extends BasicModel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1398329557545952620L;

	public static final String TABLE_NAME = "real_time_analysis_v2";
	
	/**
	 * 流水號
	 */
	private int id;
	
	/**
	 * 遊戲類型+館別
	 */
	private GameNameWithHallType gameNameWithHallType;
	
	/**
	 * 遊戲類型+館別(註釋)
	 */
	private String gameNameWithHallTypeDesc;
	
	/**
	 * 幣值比
	 */
	private BigDecimal gainRate;
	
	/**
	 * 平台名稱
	 */
	private PlatformType platformType;

	/**
	 * 遊戲人數_正式
	 */
	private int realTimeMemberFormal;
	
	/**
	 * 遊戲人數_掛機
	 */
	private int realTimeMemberOfflineSpin;
	
	/**
	 * 遊戲人數_試玩
	 */
	private int realTimeMemberTrial;

	/**
	 * 遊戲人數_立即玩
	 */
	private int realTimeMemberNoAccount;

	/**
	 * 總投注_正式
	 */
	private BigDecimal totalBetFormal;

	/**
	 * 總投注_掛機
	 */
	private BigDecimal totalBetOfflineSpin;
	
	/**
	 * 總投注_試玩
	 */
	private BigDecimal totalBetTrail;

	/**
	 * 總投注_立即玩
	 */
	private BigDecimal totalBetNoAccount;
	
	/**
	 * 即時總投注_正式
	 */
	private BigDecimal realTimeBetFormal;
	
	/**
	 * 即時總投注_離線SPIN
	 */
	private BigDecimal realTimeBetOfflineSpin;
	
	/**
	 * 即時總投注_試玩
	 */
	private BigDecimal realTimeBetTrial;
	
	/**
	 * 即時總投注_立即玩
	 */
	private BigDecimal realTimeBetNoAccount;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Enumerated(EnumType.STRING)
	public GameNameWithHallType getGameNameWithHallType() {
		return gameNameWithHallType;
	}

	public void setGameNameWithHallType(GameNameWithHallType gameNameWithHallType) {
		this.gameNameWithHallType = gameNameWithHallType;
		this.setGameNameWithHallTypeDesc(gameNameWithHallType.getNameString());
	}

	public String getGameNameWithHallTypeDesc() {
		return gameNameWithHallTypeDesc;
	}

	public void setGameNameWithHallTypeDesc(String gameNameWithHallTypeDesc) {
		this.gameNameWithHallTypeDesc = gameNameWithHallTypeDesc;
	}

	@Enumerated(EnumType.STRING)
	public PlatformType getPlatformType() {
		return platformType;
	}

	public void setPlatformType(PlatformType platformType) {
		this.platformType = platformType;
	}

	@Column(nullable = false, columnDefinition = "int default 0")
	public int getRealTimeMemberFormal() {
		return realTimeMemberFormal;
	}

	public void setRealTimeMemberFormal(int realTimeMemberFormal) {
		this.realTimeMemberFormal = realTimeMemberFormal;
	}

	@Column(nullable = false, columnDefinition = "int default 0")
	public int getRealTimeMemberOfflineSpin() {
		return realTimeMemberOfflineSpin;
	}

	public void setRealTimeMemberOfflineSpin(int realTimeMemberOfflineSpin) {
		this.realTimeMemberOfflineSpin = realTimeMemberOfflineSpin;
	}

	@Column(nullable = false, columnDefinition = "int default 0")
	public int getRealTimeMemberTrial() {
		return realTimeMemberTrial;
	}

	public void setRealTimeMemberTrial(int realTimeMemberTrial) {
		this.realTimeMemberTrial = realTimeMemberTrial;
	}

	@Column(nullable = false, columnDefinition = "int default 0")
	public int getRealTimeMemberNoAccount() {
		return realTimeMemberNoAccount;
	}

	public void setRealTimeMemberNoAccount(int realTimeMemberNoAccount) {
		this.realTimeMemberNoAccount = realTimeMemberNoAccount;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getTotalBetFormal() {
		return totalBetFormal;
	}

	public void setTotalBetFormal(BigDecimal totalBetFormal) {
		this.totalBetFormal = totalBetFormal;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getTotalBetOfflineSpin() {
		return totalBetOfflineSpin;
	}

	public void setTotalBetOfflineSpin(BigDecimal totalBetOfflineSpin) {
		this.totalBetOfflineSpin = totalBetOfflineSpin;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getTotalBetTrail() {
		return totalBetTrail;
	}

	public void setTotalBetTrail(BigDecimal totalBetTrail) {
		this.totalBetTrail = totalBetTrail;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getTotalBetNoAccount() {
		return totalBetNoAccount;
	}

	public void setTotalBetNoAccount(BigDecimal totalBetNoAccount) {
		this.totalBetNoAccount = totalBetNoAccount;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getRealTimeBetFormal() {
		return realTimeBetFormal;
	}

	public void setRealTimeBetFormal(BigDecimal realTimeBetFormal) {
		this.realTimeBetFormal = realTimeBetFormal;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getRealTimeBetOfflineSpin() {
		return realTimeBetOfflineSpin;
	}

	public void setRealTimeBetOfflineSpin(BigDecimal realTimeBetOfflineSpin) {
		this.realTimeBetOfflineSpin = realTimeBetOfflineSpin;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getRealTimeBetTrial() {
		return realTimeBetTrial;
	}

	public void setRealTimeBetTrial(BigDecimal realTimeBetTrial) {
		this.realTimeBetTrial = realTimeBetTrial;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getRealTimeBetNoAccount() {
		return realTimeBetNoAccount;
	}

	public void setRealTimeBetNoAccount(BigDecimal realTimeBetNoAccount) {
		this.realTimeBetNoAccount = realTimeBetNoAccount;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 1.0")
	public BigDecimal getGainRate() {
		return gainRate;
	}

	public void setGainRate(BigDecimal gainRate) {
		this.gainRate = gainRate;
	}
	
}
